package eu.smoothit.sis.controller.iop;

import java.util.List;

import javax.ejb.Local;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;


/**
 * The local interface for the rating swarms 
 * implemented as an EJB3 session bean
 * 
 * @author Sergios Soursos, Intracom Telecom
 * @version 1.0
 *                  
 */
@Local
public interface TorrentRating {
	
	/**
	 * Prepares a sorted list of TorrentStat entries which
	 * represents the most popular torrents according to the SIS (see D2.3).
	 * 
	 *  @param maxTorrents The maximum number of torrents to be returned.
	 *  
	 *  @return The list of ranked torrents
	 */
	public List<TorrentStat> getRankedTorrents(int maxTorrents);
	
	public void storePeerActivity(ActivityReport report);
	
	public List<ResponseEntry> updateAndRetrieveSwarmInfo(List<ActiveTorrent> torrents);

}
